package edu.sctu.fengleilin.month06.day150610.GameRandom;

import java.util.Random;

/**
 * Created by user09 on 2015/6/10.
 */
public class GameWay {

    public void setGameData(){
        Random random = new Random();

    GameData gameData = new GameData();
        int game1 = gameData.input();
        int game2 = gameData.input1();
        int game3 = gameData.input2();
        int game4 = gameData.input3();
        int[] games = {game1,game2,game3,game4};
//
//        int i= random.nextInt(games.length);
//        int a = games[i];
//        System.out.println(a);
//
//        int j= random.nextInt(games.length);
//        int b = games[j];
//        System.out.println(b);

                if (game1 == game2 & game1 == game3 & game1 == game4 & game2 == game3 & game3 == game4 & game2 == game4){
                    System.out.println("恭喜您！获得一部汽车！");

                }else if (game1 == game2 & game1 == game3 & game2 == game3 | game2 == game3 & game3 == game4 & game2 == game4 | game1 == game2 &game1 == game4 |game2 == game4){
                    System.out.println("恭喜您！获得一部电视机！");

                }else if (game1 == game2 | game1 == game3 | game1 == game4 | game2 == game3 | game3 == game4 | game2 == game4){
                    System.out.println("免费再玩一次！");
                }else {
                    System.out.println("您已结束本次游戏！");
                }
            }
        }

